package com.src.myapplication.ui.view.fragmentzhibo;

import android.view.View;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.src.myapplication.R;
import com.src.myapplication.base.BaseFragmentSwp;
import com.src.myapplication.bean.TuiJianben;
import com.src.myapplication.config.UrlConfig;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;


/**
 * Created by Administrator on 2016/10/17.
 */
public class TuiJian extends BaseFragmentSwp {


    @Override
    protected void initData(View view) {

    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_tuijian;
    }

    @Override
    public int getid() {
        return R.id.sw;
    }

    @Override
    public String geturl() {
        return UrlConfig.ZhiBo.ZHIBO_TUIJIAN;
    }

    @Override
    public Class<?> getben() {
        return TuiJianben.class;
    }


    @Override
    public void addList(String list) {

        if(list!=null){


            Gson gson=new Gson();
            List<TuiJianben> menbens = new ArrayList<>();
            Type type= new TypeToken<ArrayList<TuiJianben>>(){}.getType();
            menbens= gson.fromJson(list, type);
        }

    }


    @Override
    public void showLoadFailMsg() {
    }

}